rf = open('./data/original_train_data/SMSSpamCollection', 'rt', encoding='utf-8')
wf = open('./data/original_train_data/1.txt', 'wt', encoding='utf-8')
wt = ''
for line in rf:
    items = line.split('\t')
    wt += ('1' if items[0] == 'spam' else '0') + '\t' + items[1]
wt = wt.strip('\n')
wf.writelines(wt)
rf.close()
wf.close()
